#include<iostream>
using namespace std;
int main()
{
	int a, b;
	cin >> a >> b;
	int x, y;
	x = a > b ? a : b;
	y = a + b - x;
	cout << x << endl;
	cout << y << endl;
	return 0;
}			 